const express = require('express');
const app = express();
const router = require('./router/index');
const cors = require('cors');

// 跨域处理
app.use(cors());
// post请求 表单数据
app.use(express.urlencoded({ extended: true }));
// 静态资源共享
app.use(express.static('upload'))

app.use('/', router);


app.listen(7878, () => {
    console.log('server running at http://127.0.0.1:7878');
})